package com.unsins.test.batch;

import org.springframework.batch.core.step.tasklet.Tasklet;
import org.springframework.batch.repeat.ExitStatus;

/**
 * Created by IntelliJ IDEA.
 * User: odpsoft
 * Date: 2008-12-16
 * Time: 11:27:46
 */
public class PrintTasklet implements Tasklet {

    private String message;

    public void setMessage(String message) {
        this.message = message;
    }

    public ExitStatus execute() throws Exception {
        System.out.print(message);

/*
        if (message.equals("odpsoft!"))
            throw new Exception("asdasdasd");
*/
        return ExitStatus.FINISHED;
    }
}
